using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using NTTHAO.CommonWeb;
using NTTHAO.Web.BL.Product;

public partial class admin_webparts_Plug_ins_Product_ProductGroupList : System.Web.UI.UserControl
{
    public DataTable _GroupList = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            int langID = LanguageUtility.GetLanguageID(Request, Session);
            int siteID = WebGlobal.GetSite().ID;

            _GroupList = ProductGroup.GetAll(siteID, langID);

            if (_GroupList != null && _GroupList.Rows.Count == 1)
            {
                DataRow row = _GroupList.Rows[0];
                string url = "?type=" + Request.QueryString["type"] + "&name=" + Request.QueryString["name"] + "&action=viewgroup&g=" + row[ProductGroup.ID__COLUMN_NAME];

                Response.Redirect(url);
            }
        }
        catch (Exception)
        {
        }
    }
}
